/**
 * 
 */
package com.jjt.kiki.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @author jiangjintai
 * map制造工产，每次调用put的时候往hashMap里面添加一个值并返回本身
 * 最后调用build()返回map
 */
public class MyMapBuilder {

	public static MyMap buildSuccessMap(Object content){
		MyMap map = new MyMap();
		map.put("state", true).put("message","操作成功").put("data", content);
		return map;
	}

	public static MyMap buildErrorMap(String message){
		MyMap map = new MyMap();
		map.put("state", false);
		map.put("message", message);
		return map;
	}
	
	public static MyMap  buildMap(){
		return new MyMap();
	}
}
